<!-- 热门推荐 -->
<template>
  <div class="recommend">
    <div class="title">
      <img class="title-img" src="https://imgs.qunarzz.com/piao/fusion/1711/89/ebc329f16c55bb02.png" alt="猜你喜欢"> 热销推荐
    </div>
    <ul>
      <router-link tag="li" :to="'/detail/'+item.id" class="item border-bottom" v-for="item in list" :key="item.id">
        <img class="item-img" :src="item.imgUrl" :alt="item.title">
        <div class="item-info">
          <p class="item-title" v-text="item.title"></p>
          <p class="item-desc" v-text="item.desc"></p>
          <button class="item-button">查看详情</button>
          <p class="item-site" v-text="item.site"></p>
        </div>
      </router-link>
    </ul>
    <div class="look-all">查看所有产品</div>
  </div>
</template>

<script>
export default {
  name: 'Recommend',
  props: {
    list: Array
  },
  data () {
    return {
    }
  }
}

</script>
<style lang='stylus' scoped>
@import '~styles/mixins.styl';
.recommend
  background-color #fff
  .title
    margin-top .2rem
    line-height .8rem
    text-indent .2rem
    font-size .32rem
    .title-img
      position relative
      top -.03rem
      width: .3rem;
      height: .3rem;
  .item
    overflow hidden
    display flex
    margin-left .2rem
    padding .2rem 0
    .item-img
      width 2rem
      height 2rem
      padding-right .1rem
    .item-info
      position relative
      flex 1
      padding .1rem
      min-width 0
      .item-title
        line-height .54rem
        font-size .32rem
        ellipsis()
      .item-desc
        line-height .4rem
        color #616161
        ellipsis()
      .item-button
        line-height .44rem
        margin-top .3rem
        background #ff9300
        padding .05rem .2rem 0 .2rem
        border-radius .06rem
        color #fff
      .item-site
        position absolute
        right .2rem
        bottom .1rem
        color: #616161;
        font-size: .24rem;
        line-height: .4rem;
  .look-all
    line-height .8rem
    text-indent .2rem
    text-align center
    font-size .28rem
    color #00afc7;
</style>
